import os

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node


def generate_launch_description():
    # 获取配置文件路径
    config = os.path.join(
        get_package_share_directory("lidar_detection_fusion"),
        "config",
        "params.yaml",
    )

    return LaunchDescription(
        [
            Node(
                package="lidar_detection_fusion",
                executable="fusion_node",
                name="fusion_node",
                parameters=[config],
                output="screen",
            ),
        ],
    )
